extends "../calxsx_1_1/calxsx_1_1.gd"
func _init():
	pass
func _extInit():
	._extInit()
	chaName = "古渊露龙"     
	lv = 4
	addSkillTxt("[color=#FFFF00][无极海啸][/color]:[color=#FFCC22]召唤海啸攻击敌方全体，造成200%水系魔法伤害并<溺水>4秒，恢复场上溺水层数总数*0.5%的体力[CD:16][/color]")
	addCdSkill("haixiao",16) 
	
func _castCdSkill(id):
	._castCdSkill(id)
	if id == "haixiao":
		var chas = getAllChas(1)
		var eff = sys.newEff("numHit", position, false, 1)
		eff.setText("无极海啸", "#FF0099")
		eff.anim.set_speed_scale(0.2)
		for i in chas:
			typeHurtCha(i,att.mgiAtk*2,Chara.HurtType.MGI,Chara.AtkType.SKILL)
			i.addBuff(bf.nishui.new(5))
		var chas1 = getAllChas(0)
		var s = 0
		for cha in chas1 :
			var bf:Buff = cha.hasBuff("nishui")
			if bf != null:
				if cha.team == team :
					bf.att.reHp = 0.0
				else:
					s += bf.life
		upAtt()
		plusHp(s * att.maxHp * 0.005)